package  
{

	import application.controller.LevelController;
	import application.controller.PlayerController;
	import application.model.LevelModel;
	import application.view.SceneHolder;
	import flash.display.Sprite;
	import flash.events.Event;
	/**
	 * ...
	 * @author Tiago Salomon
	 */
	public class Application extends Sprite
	{
		private var _levelController	:LevelController;
		private var _playerController	:PlayerController;
		private var _scene				:SceneHolder;
		
		public function Application() 
		{
			this.addEventListener(Event.ADDED_TO_STAGE, initialize);
		}
		
		private function initialize(e:Event):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, initialize);
			
			_scene = new SceneHolder(this);			
			
			_levelController = new LevelController();
			_levelController.loadLevels();
			
			_playerController = new PlayerController();
			_playerController.addPlayer();
		}
		
	}

}